home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Softwarová Záchrana 3
/
Softwarova-zachrana-3.bin
/
Xteq X-Setup
/
xqdcXSP-Setup-EN.exe
/
{app}
/
plugins
/
XQ AutoRun Lister.xpl
< prev
next >
Wrap
Text File
|
2004-03-01
|
4KB
|
154 lines
"FILE"="Xteq Systems X-Setup Plugin 6.0"
"TYPE"="8"
"COUNT"="3"
"UIPATH 1"="Startup/Shutdown\Startup\Windows 9x/ME\50) AutoRun - Part 1"
"UIPATH 2"="Startup/Shutdown\Startup\Windows NT/2K/XP\20) AutoRun - Part 1"
"UIPATH 3"="Virtual Paranoia\Hijacker Places"
"NAME"="AutoRun Programs (All Users)"
"VERSION"="2.05"
"LANGUAGE"="VBScript"
"TEXT 1"="Show Info"
"TEXT 2"="Enable/Disable"
"TEXT 3"="Delete"
"DESCRIPTION 1"="These programs are always started when this computer is started."
"DESCRIPTION 2"="Click "Show Info" to see the command that is executed, "Enable/Disable" to enable or disable an item or "Delete" to remove an item."
"AUTHOR"="Xteq Systems"
"CONTACTURL"="http://www.xteq.com"
"COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
"COMMENT 1"=" "
'/*** MAIN TEMPLATE IS XQ AutoRun Lister.XPL ***/
'/*** ONLY CHANGE REGISTRY KEYS BELOW ***/
sP="HKLM\Software\Microsoft\Windows\CurrentVersion\Run\"
sPD1="HKLM\Software\Microsoft\Windows\CurrentVersion\Run-\"
sPD2="HKLM\Software\Microsoft\Windows\CurrentVersion\Run (Disabled)\"
'/////////////////////////////////
'///*** NO CHANGES BELOW HERE ***/
Dim aryLoc()
Dim iReadAllCount
sDisabled=" [DISABLED]"
Sub Plugin_Initialize
iReadAllCount=0
Call ReloadAll
End Sub
Sub ReloadAll
for i=1 to iReadAllCount
Call SetUIElement(i,"")
next
i=0
iC=RegEnumValues(sP)
i=i+iC
iC=RegEnumValues(sPD1)
i=i+iC
iC=RegEnumValues(sPD2)
i=i+iC
ReDim aryLoc(i)
iReadAllCount=1
Call ReadAll(sP,1,false)
Call ReadAll(sPD1,2,true)
Call ReadAll(sPD2,3,true)
End Sub
Sub ReadAll(key,idx,IsDisabledKey)
iC=RegEnumValues(key)
if iC>0 then
for l=1 to iC
sName=RegEnumElement(l)
If IsDisabledKey=true then
sName=sName & sDisabled
end if
Call SetUIElement(iReadAllCount,sName)
aryLoc(iReadAllCount)=idx
iReadAllCount=iReadAllCount+1
Next
end if
End Sub
Sub Plugin_CheckData(ElementIndex)
End Sub
Sub Plugin_Apply(ElementIndex,ElementSubIndex)
if ElementSubIndex>0 then
'Look up Registry key
if aryLoc(ElementSubIndex)=1 then
sRegPath=sP
elseif aryLoc(ElementSubIndex)=2 then
sRegPath=sPD1
else
sRegPath=sPD2
end if
'Look up Registry name
sRegName=GetUIElement(ElementSubIndex)
bIsEnabled=true
If InStr(sRegName,sDisabled)>0 then
sRegName=Left(sRegName,len(sRegName)-len(sDisabled))
bIsEnabled=false
end if
'Look up Value
sValue=RegReadValue(sRegPath & sRegName)
'msginformation sRegPath
'msginformation sRegName & "]"
'msginformation sValue
if ElementIndex=1 then '//Information
Call MsgInformation("Command: " & vbCrlF & vbCrlf & sValue)
end if
If ElementIndex=2 then '//Enable/Disable
if bIsEnabled=true then
'//Disable it
Call RegWriteValue(sPD1 & sRegName,sValue,1)
Call RegDeleteValue(sRegPath & sRegName)
else
'//Enable it
Call RegWriteValue(sP & sRegName,sValue,1)
Call RegDeleteValue(sRegPath & sRegName)
end if
Call ReloadAll
end if
If ElementIndex=3 then 'Delete
If bIsEnabled=true then
Call MsgError("Unable to delete an enabled item - please disable it first before trying to delete it")
else
Call RegDeleteValue(sRegPath & sRegName)
Call ReloadAll
Call Restart
end if
end if
end if
End Sub
Sub Plugin_Terminate
End Sub